<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>计算案例-父子通信</title>
    <script src='/js/vue.js'></script>
</head>
<body>
    <div id='app'>
        <p>计数: {{counter}}</p>
    </div>
<!-- 1.创建模板 -->
    <template id="cpn">
        <div>
            <button>+</button>
            <button>-</button>
        </div>
    </template>
    
    <script>
        //2.创建子组件对象
        const cpn ={
            template:'#cpn'
        }
        let app = new Vue({
         el: '#app',
         data: {
          counter:0
         }
        });
    </script>
</body>
</html>